﻿<UserControl
  xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  xmlns:vp="clr-namespace:UI.Control"
  xmlns:properties="clr-namespace:MediaDesktopPlayerAddIn.Properties"
  x:Class="UI.Control.VideoWindow"
  Height="250"
  Width="345" xmlns:d="http://schemas.microsoft.com/expression/blend/2006" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d">
    <UserControl.Resources>
        <Storyboard x:Key="SetMouseInactiveInner">
            <Storyboard>
                <DoubleAnimation To="0" Duration="00:00:00.4000000" Storyboard.TargetName="borControl" Storyboard.TargetProperty="Opacity" />
            </Storyboard>
        </Storyboard>

        <Storyboard x:Key="SetMouseActiveInner">
            <Storyboard>
                <DoubleAnimation To="1" Duration="00:00:00.4000000" Storyboard.TargetName="borControl" Storyboard.TargetProperty="Opacity" />
            </Storyboard>
        </Storyboard>
    </UserControl.Resources>

    <!-- Opended Window -->
    <vp:ChildWindowDecoratorVideo x:Name="childWindowManager" IsResizable="True" MoveWindowFromBar="False">
        <Grid>

            <MediaElement x:Name="mediaElement" LoadedBehavior="Manual"/>

            <Viewbox Margin="10">
                <TextBlock
					   x:Name="txtError"
					   Text="{x:Static properties:Globalization.VideoWindow_UnableToLoadVideo}"
					   Foreground="{DynamicResource VOColor20}"
					   HorizontalAlignment="Center"
					   VerticalAlignment="Center"
					   FontSize="30"
					   FontWeight="Bold"
					   Visibility="Collapsed"/>
            </Viewbox>

            <Viewbox x:Name="borControl" Stretch="Uniform" MaxWidth="800" MinWidth="200" MinHeight="50"  VerticalAlignment="Bottom" Margin="0,0,0,5">
                <Grid Width="340" Height="50">
                    <Border Background="{DynamicResource VOColor10}" Opacity="0.6" CornerRadius="1" Margin="5,10,5,10"/>
                    <StackPanel Orientation="Horizontal" VerticalAlignment="Center" Margin="10,10,10,10">
                        <Button Style="{DynamicResource Button.TransparentWithEffect4}" Margin="2,2,0,2" x:Name="btnFullScreen">
                            <Grid>
                                <Grid x:Name="griFullScreen">
                                    <Grid.RowDefinitions>
                                        <RowDefinition/>
                                        <RowDefinition/>
                                    </Grid.RowDefinitions>
                                    <Grid.ColumnDefinitions>
                                        <ColumnDefinition/>
                                        <ColumnDefinition/>
                                    </Grid.ColumnDefinitions>
                                    <Path
											Grid.Row="0"
											Grid.Column="0"
											Width="8"
											Height="8"
											Data="M0,0 60,-60 60,-15 120,-15 120,15 60,15 60,60 z"
											Stretch="Fill"
											Fill="{DynamicResource VOGradient01}"
											Stroke="{DynamicResource VOGradient02}" RenderTransformOrigin="0.5,0.5">
                                        <Path.RenderTransform>
                                            <TransformGroup>
                                                <ScaleTransform ScaleX="1" ScaleY="1"/>
                                                <SkewTransform AngleX="0" AngleY="0"/>
                                                <RotateTransform Angle="45"/>
                                                <TranslateTransform X="0" Y="0"/>
                                            </TransformGroup>
                                        </Path.RenderTransform>
                                    </Path>
                                    <Path
											Grid.Row="0"
											Grid.Column="1"
											Width="8"
											Height="8"
											Data="M0,0 60,-60 60,-15 120,-15 120,15 60,15 60,60 z"
											Stretch="Fill"
											Fill="{DynamicResource VOGradient01}"
											Stroke="{DynamicResource VOGradient02}" RenderTransformOrigin="0.5,0.5">
                                        <Path.RenderTransform>
                                            <TransformGroup>
                                                <ScaleTransform ScaleX="1" ScaleY="1"/>
                                                <SkewTransform AngleX="0" AngleY="0"/>
                                                <RotateTransform Angle="135"/>
                                                <TranslateTransform X="0" Y="0"/>
                                            </TransformGroup>
                                        </Path.RenderTransform>
                                    </Path>
                                    <Path
											Grid.Row="1"
											Grid.Column="0"
											Width="8"
											Height="8"
											Data="M0,0 60,-60 60,-15 120,-15 120,15 60,15 60,60 z"
											Stretch="Fill"
											Fill="{DynamicResource VOGradient01}"
											Stroke="{DynamicResource VOGradient02}" RenderTransformOrigin="0.5,0.5">
                                        <Path.RenderTransform>
                                            <TransformGroup>
                                                <ScaleTransform ScaleX="1" ScaleY="1"/>
                                                <SkewTransform AngleX="0" AngleY="0"/>
                                                <RotateTransform Angle="-45"/>
                                                <TranslateTransform X="0" Y="0"/>
                                            </TransformGroup>
                                        </Path.RenderTransform>
                                    </Path>
                                    <Path
											Grid.Row="1"
											Grid.Column="1"
											Width="8"
											Height="8"
											Data="M0,0 60,-60 60,-15 120,-15 120,15 60,15 60,60 z"
											Stretch="Fill"
											Fill="{DynamicResource VOGradient01}"
											Stroke="{DynamicResource VOGradient02}" RenderTransformOrigin="0.5,0.5">
                                        <Path.RenderTransform>
                                            <TransformGroup>
                                                <ScaleTransform ScaleX="1" ScaleY="1"/>
                                                <SkewTransform AngleX="0" AngleY="0"/>
                                                <RotateTransform Angle="-135"/>
                                                <TranslateTransform X="0" Y="0"/>
                                            </TransformGroup>
                                        </Path.RenderTransform>
                                    </Path>
                                </Grid>
                                <Grid x:Name="griNormalScreen" Visibility="Collapsed">
                                    <Grid.RowDefinitions>
                                        <RowDefinition/>
                                        <RowDefinition/>
                                    </Grid.RowDefinitions>
                                    <Grid.ColumnDefinitions>
                                        <ColumnDefinition/>
                                        <ColumnDefinition/>
                                    </Grid.ColumnDefinitions>
                                    <Path
											Grid.Row="0"
											Grid.Column="0"
											Width="8"
											Height="8"
											Data="M0,0 60,-60 60,-15 120,-15 120,15 60,15 60,60 z"
											Stretch="Fill"
											Fill="{DynamicResource VOGradient01}"
											Stroke="{DynamicResource VOGradient02}" RenderTransformOrigin="0.5,0.5">
                                        <Path.RenderTransform>
                                            <TransformGroup>
                                                <ScaleTransform ScaleX="1" ScaleY="1"/>
                                                <SkewTransform AngleX="0" AngleY="0"/>
                                                <RotateTransform Angle="-135"/>
                                                <TranslateTransform X="0" Y="0"/>
                                            </TransformGroup>
                                        </Path.RenderTransform>
                                    </Path>
                                    <Path
											Grid.Row="0"
											Grid.Column="1"
											Width="8"
											Height="8"
											Data="M0,0 60,-60 60,-15 120,-15 120,15 60,15 60,60 z"
											Stretch="Fill"
											Fill="{DynamicResource VOGradient01}"
											Stroke="{DynamicResource VOGradient02}" RenderTransformOrigin="0.5,0.5">
                                        <Path.RenderTransform>
                                            <TransformGroup>
                                                <ScaleTransform ScaleX="1" ScaleY="1"/>
                                                <SkewTransform AngleX="0" AngleY="0"/>
                                                <RotateTransform Angle="-45"/>
                                                <TranslateTransform X="0" Y="0"/>
                                            </TransformGroup>
                                        </Path.RenderTransform>
                                    </Path>
                                    <Path
											Grid.Row="1"
											Grid.Column="0"
											Width="8"
											Height="8"
											Data="M0,0 60,-60 60,-15 120,-15 120,15 60,15 60,60 z"
											Stretch="Fill"
											Fill="{DynamicResource VOGradient01}"
											Stroke="{DynamicResource VOGradient02}" RenderTransformOrigin="0.5,0.5">
                                        <Path.RenderTransform>
                                            <TransformGroup>
                                                <ScaleTransform ScaleX="1" ScaleY="1"/>
                                                <SkewTransform AngleX="0" AngleY="0"/>
                                                <RotateTransform Angle="135"/>
                                                <TranslateTransform X="0" Y="0"/>
                                            </TransformGroup>
                                        </Path.RenderTransform>
                                    </Path>
                                    <Path
											Grid.Row="1"
											Grid.Column="1"
											Width="8"
											Height="8"
											Data="M0,0 60,-60 60,-15 120,-15 120,15 60,15 60,60 z"
											Stretch="Fill"
											Fill="{DynamicResource VOGradient01}"
											Stroke="{DynamicResource VOGradient02}" RenderTransformOrigin="0.5,0.5">
                                        <Path.RenderTransform>
                                            <TransformGroup>
                                                <ScaleTransform ScaleX="1" ScaleY="1"/>
                                                <SkewTransform AngleX="0" AngleY="0"/>
                                                <RotateTransform Angle="45"/>
                                                <TranslateTransform X="0" Y="0"/>
                                            </TransformGroup>
                                        </Path.RenderTransform>
                                    </Path>
                                </Grid>
                            </Grid>
                        </Button>

                        <Button x:Name="btnPrevious" Style="{DynamicResource Button.TransparentWithEffect4}" Margin="7,0,2,0" Width="15" Height="15">
                            <StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
                                <Path
									  Width="6"
									  Height="11"
									  Data="M60,100 L60,0 0,50 z"
									  Stretch="Fill"
									  Fill="{DynamicResource VOGradient01}"
									  Stroke="{DynamicResource VOGradient02}"/>
                                <Path
									  Width="6"
									  Height="11"
									  Data="M60,100 L60,0 0,50 z"
									  Stretch="Fill"
									  Fill="{DynamicResource VOGradient01}"
									  Stroke="{DynamicResource VOGradient02}"/>
                            </StackPanel>
                        </Button>
                        <Button x:Name="btnPlay" Style="{DynamicResource Button.TransparentWithEffect4}" Margin="0,0,1,0" Width="20" Height="20" VerticalAlignment="Center">
                            <Grid>
                                <Path
									  x:Name="patPlay"
									  HorizontalAlignment="Center"
									  Width="7"
									  Height="12"
									  Data="M0,100 L0,0 60,50 z"
									  Stretch="Fill"
									  Fill="{DynamicResource VOGradient01}"
									  Stroke="{DynamicResource VOGradient02}"/>
                                <StackPanel x:Name="patPause" Visibility="Collapsed" Orientation="Horizontal" HorizontalAlignment="Center">
                                    <Path
										  Width="3"
										  Height="12"
										  Data="M0,0 20,0 20,100 0,100 z"
										  Stretch="Fill"
										  Fill="{DynamicResource VOGradient01}"
										  Stroke="{DynamicResource VOGradient02}"/>
                                    <Path
										  Margin="2,0,0,0"
										  Width="3"
										  Height="12"
										  Data="M0,0 20,0 20,100 0,100 z"
										  Stretch="Fill"
										  Fill="{DynamicResource VOGradient01}"
										  Stroke="{DynamicResource VOGradient02}"/>
                                </StackPanel>
                            </Grid>
                        </Button>

                        <Slider x:Name="sliPosition" Style="{DynamicResource Slider.PositionWithEffect4}" Maximum="100" LargeChange="10" Width="70" VerticalAlignment="Center" Margin="10,0,2,0"/>

                        <TextBlock
                                x:Name="txtProgress"
                                Text="0:0:0/0:0:0"
                                Foreground="{DynamicResource VOColor1A}"
                                HorizontalAlignment="Center"
                                VerticalAlignment="Center"
                                Margin="2,0,10,0"/>

                        <Button x:Name="btnMute" Style="{DynamicResource Button.TransparentWithEffect4}" Margin="2,0,2,0" Width="15" Height="15">
                            <Grid>
                                <StackPanel x:Name="patMuteOn" Orientation="Horizontal" HorizontalAlignment="Center">
                                    <Path
										  Width="2"
										  Height="6"
										  Data="M0,40 0,60"
										  Stretch="Fill"
										  VerticalAlignment="Center"
										  Fill="{DynamicResource VOGradient01}"
										  Stroke="{DynamicResource VOGradient02}"/>
                                    <Path
										  Margin="1,0,0,0"
										  Width="4"
										  Height="14"
										  Data="M20,35 80,0 80,100 20,65 z"
										  Stretch="Fill"
										  VerticalAlignment="Center"
										  Fill="{DynamicResource VOGradient01}"
										  Stroke="{DynamicResource VOGradient02}"
                />
                                </StackPanel>
                                <StackPanel x:Name="patMuteOff" Orientation="Horizontal" HorizontalAlignment="Center" Visibility="Collapsed">
                                    <Path
										  Width="2"
										  Height="6"
										  Data="M0,40 0,60"
										  Stretch="Fill"
										  VerticalAlignment="Center"
										  Fill="{DynamicResource VOGradient01}"
										  Stroke="{DynamicResource VOGradient02}"/>
                                    <Path
										  Margin="1,0,0,0"
										  Width="4"
										  Height="14"
										  Data="M20,35 80,0 80,100 20,65 z"
										  Stretch="Fill"
										  VerticalAlignment="Center"
										  Fill="{DynamicResource VOGradient01}"
										  Stroke="{DynamicResource VOGradient02}"
                />
                                    <Canvas Width="6" Height ="6" VerticalAlignment="Center" Margin="1,0,0,0">
                                        <Line X1="0" Y1="0" X2="6" Y2="6" Stroke="{DynamicResource VOGradient02}"/>
                                        <Line X1="0" Y1="6" X2="6" Y2="0" Stroke="{DynamicResource VOGradient02}"/>
                                    </Canvas>
                                </StackPanel>
                            </Grid>
                        </Button>
                        <Slider x:Name="sliVolume" Style="{DynamicResource Slider.VolumeWithEffect4}" Maximum="100" LargeChange="10" Value="0" Margin="0,0,10,0" Width="72" VerticalAlignment="Center"/>
                    </StackPanel>
                </Grid>
            </Viewbox>

        </Grid>
    </vp:ChildWindowDecoratorVideo>

</UserControl>
